package tree;

import java.util.Collection;
import java.util.LinkedList;

public class TrieNode {
	char content;
	boolean isLeaf;
	Collection<TrieNode> child;

	public TrieNode(char c) {
		child = new LinkedList<TrieNode>();
		isLeaf = false;
		content = c;
	}

	public TrieNode subNode(char c) {
		if (child != null) {
			for (TrieNode eachChild : child) {
				if (eachChild.content == c) {
					return eachChild;
				}
			}
		}
		return null;
	}

}
